<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>商户管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<c:url value="/css/a.css"/>" type="text/css" rel="stylesheet"/>
<link href="<c:url value="/css/index.css"/>" type="text/css" rel="stylesheet"/>
	<script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>   
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script language="javascript" type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	
	<style> 
　　　
　　　　　a {text-decoration:none} 
　　　　　a:hover {color: red;text-decoration:none} 
          a:VISITED {color: blue;}
　　
　　　</style> 

<script type="text/javascript"><!--
  $(document).ready(function(){
  		/*$("#deleteBtn").click(function(){
  				
  			var len=$("#tableList").find(":checkbox[name=multi_sel]:checked").length;
  			
  			if(len>0){
  				var isOk=confirm('您确定要删除所选中的记录吗?');;
  				if(isOk){
  				 $("#queryUserForm").attr("action","/PWMS/pages/userManageDelete.action");
  				}
  				return isOk;
  			}else{
  				alert('请先择要删除的记录！！！');
  				return false;
  			}
  			
  		});*/
  		$("#athourityBtn").click(function(){
  		    var len=$("#tableList").find(":checkbox[name=multi_sel]:checked").length;
  			
  			if(len>0){
  			    if(len==1){
  			      
  				  $("#queryUserForm").attr("action","/PWMS/athourity/toAthourity.action");
  				  return true;
  			    }else{
  			      alert('选择的记录太多！！！');
  				  return false;
  			    }
  				
  			}else{
  				alert('请先择要设置权限的记录！！！');
  				return false;
  			}
  				 
  				
  	    });
  	   /* $("#modifyBtn").click(function(){
  	        var len=$("#tableList").find(":checkbox[name=multi_sel]:checked").length;
  			
  			if(len>0){
  			    if(len==1){
  			      
  				  $("#queryUserForm").attr("action","/PWMS/pages/toModifyUserInfo.action");
  				  return true;
  			    }else{
  			      alert('选择的记录太多！！！');
  				  return false;
  			    }
  				
  			}else{
  				alert('请先择要修改的记录！！！');
  				return false;
  			}
  				
  	    });*/
  	    
  
  });
  
  --></script>

	

  </head>
  
  <body>
       <div class="subpage">
	      <s:form id="queryUserForm" action="/athourity/searchMerchant.action" method="post"  theme="simple">
	    		
	    		<div class="user_title">
	    		 <h2 class="headline-inquires">EPOS运营管理系统<br /><span class="sub-title">Resource sharing card management system
	    		 </span></h2>
	    		</div>
	    		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="query_table">
	    		
	    		<tr><td colspan="4" align="center">
	    		 <h2 class="headline-inquires">商户管理<br /><span class="sub-title"></span></h2>
	    			
	    		</td></tr>
	    		
	    		
			    <tr><td colspan="4">&nbsp;</td></tr>
	    		
	    		
	           <tr>
				<td align="right">商户号：</td><td align="left"  colspan="1">
					<s:textfield id="userNo"  name="searchCondition.merchantNo"  cssClass="queryWidth"/>
				</td> 
				<td align="right">商户姓名：</td><td align="left"  colspan="1">
					<s:textfield id="userNames"  name="searchCondition.merchantName"  cssClass="queryWidth"/>
					
				</td> 
				</tr>	
	            <tr>
			        <td align="right">商户类型：</td><td align="left"  colspan="1">
			        
					<s:select cssClass="queryWidth" id="merchantType"
							name="searchCondition.merchantType" list="#request.merchantTypeMap" headerKey="99" headerValue="--不限--"/></td>
					
					
				<td align="right">商户状态：</td><td align="left" colspan="1" >
	                 <s:select cssClass="queryWidth" id="merchantType"
							name="searchCondition.merchantStatu" list="@com.roc.util.constant.ConfigProperties@getMerchantStatus()" headerKey="99" headerValue="--不限--"/></td> 
				</tr>
				<tr><td align="right">注册时间：</td><td align="left" colspan="3" >
					<s:textfield   name="searchCondition.minDate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true,wdate:true,errDealMode:0});"   theme="simple"   cssClass="queryWidth"/>
				     &nbsp;到	&nbsp;
				    <s:textfield   name="searchCondition.maxDate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true,wdate:true,errDealMode:0});"   theme="simple"   cssClass="queryWidth"/>
			        </td>
				</tr>
				<tr><td colspan="4">&nbsp;</td></tr>
				<tr><td colspan="4" align="center">
				<s:submit value="查   询"/>
				&nbsp;&nbsp;&nbsp;&nbsp;
				<s:reset  value="取  消"/>
				</td></tr>
				<tr><td colspan="4" align="right">
				<s:if test="searchRsList.size>0">
				     <s:submit id="athourityBtn" value="设置权限"/>
				</s:if>
				<s:else>
				     <s:submit id="athourityBtn" disabled="true" value="设置权限"/>
				</s:else>
				
				&nbsp;&nbsp;&nbsp;&nbsp;
				
				</td></tr>
				
	    		<tr><td colspan="4">&nbsp;</td></tr>
	    		</table>
	    		<table width="100%" cellpadding="0" cellspacing="0" border="0">
	    		
	    		<tr><td colspan="4" align="center">
	    		 <h2 class="headline-inquires">商户信息列表</h2>
	    			
	    		</td></tr>
	    		<s:if test="searchRsList.size>0">
	             <tr><td  align="left">&nbsp;&nbsp;&nbsp;&nbsp;
					<page:pageCount max_pages="11" totalPage="${requestScope.totalPage}" currentPage="${requestScope.currentPage}" action="/PWMS/pages/search.action?currentPage="/>
								
				</td></tr>  </s:if>
	    		</table>
	    		<table id="tableList" width="100%" class="table">
						<thead><tr>
							<th>选择</th><th>商户号</th><th>商户名</th><th>商户类型</th><th>状态</th><th>手机号</th>
							<th>性别</th><th>所属商户</th><th>注册日期</th>
							</tr>
						</thead>
						<tbody>
						<s:iterator value="searchRsList" status="stat" id="element">
							<tr class="<s:if test="#stat.index%2==0">tr_0</s:if>" >
							<td align="center">
						       <s:checkboxlist name="multi_sel" list="#{#element.id:''}"  theme="simple" />
					        </td>
							<td> <s:property value="#element.merchantNo"/> </td>
							<td> <s:property value="#element.merchantName"/> </td>
					
							<td>
							<s:if test="#element.merchantType==\"01\"">
							  个人用户
							</s:if>
							<s:if test="#element.merchantType==\"02\"">
							  企业
							</s:if>
							<s:if test="#element.merchantType==\"03\"">
							  代理商
							</s:if>
							<s:if test="#element.merchantType==\"04\"">
							  系统管理员
							</s:if>
							<s:if test="#element.merchantType==\"05\"">
							  上灵科持
							</s:if>
							</td>
							<td>
							<s:if test="#element.merchantStatu=='00'">
							  待审核
							</s:if>
							<s:if test="#element.merchantStatu=='01'">
							  审核通过
							</s:if>
							<s:if test="#element.merchantStatu==\"02\"">
							  审核未通过
							</s:if>
							<s:if test="#element.merchantStatu==\"03\"">
							  冻结
							</s:if>
							<s:if test="#element.merchantStatu==\"04\"">
							  黑名单
							</s:if>
							<s:if test="#element.merchantStatu==\"05\"">
							  已删除
							</s:if>
							</td>
							
							<td> <s:property value="#element.mobilePhone"/> </td>
							
							<td> <s:property value="#element.sex"/> </td>
							
							
							<td> <s:property value="#element.parentMerchantNo"/> </td>
							<td> <s:property value="#element.dtCreate"/> </td>
				
						    </tr>
						</s:iterator>
						
					</tbody>
				</table>
	    	</s:form>
	  </div>
	 	<s:if test="#request.info_request !=null">
	<script language="javascript">
	    alert("${request.info_request}");
	</script>
	</s:if>	
  </body>
</html>
